package com.ifinc.common.web;

import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext;


public class JettyStartup {
    public static void startup(String path,String appName, int port) throws Exception {
        Server server = new Server(port);
        WebAppContext webapp = new WebAppContext(path, appName);
        server.setHandler(webapp);
        server.start();
        server.join();
    }

    public static void main(String[] args)throws Exception{
        startup("E:\\project\\idea\\simple-jee\\modules\\common\\webapp","/web",8089);
    }
}